public class 自定义标志位 {

    public static void main(String[] args) {
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 3; i++) {
                    System.out.println("thread");
                    try {
                        Thread.sleep(1000);
                        } catch(InterruptedException e){
                            e.printStackTrace();
                        }
                    }
            }
        });
        t.start();
        try {
            t.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("bit");
    }
}